import request from '../utils/request'

// 获取登录人姓名
export const GetLoginPersonName = () => {
    return request(`/api/my_employee_management`)
  }

// 获取任务时间
export const GetTaskTime = () => {
  return request('/api/task_time')
}

// 查询检查级别
export const GetCheckLevel = () => {
    return request('/api/check_level')
  }

// 查询检查表
export const GetCheckList = () => {
    return request('/api/check_list')
  }

// 查询检查项目 
export const GetCheckProject = (id) => {
  return request(`/api/check_project/${id}`)
}

// 查询检查项
export const GetCheckItem = (params) => {
    return request('/api/check_Item', {
      params
    })
  }

// 查询问题原因
export const GetProblemSource = () => {
    return request('/api/problem_source')
  }

// 新增问题
export const PostProblem = (data) => {
  return request('/api/checkrecord_add', {
    method: 'post', 
    data
  })
}

// 修改问题
export const EditProblem = (id, data) => {
  return request(`/api/checkrecord_update/${id}`, {
    method: 'put', 
    data
  })
}

// 获取员工
// export const GetEmployees = (params) => {
//   return request('/api/checkrecord_employees', {
//     params
//   })
// }


// 获取责任人
export const GetEmployees = (code) => {
  return request(`/api/querySubComEmployee/${code}`)
}

// 获取整改责任人
export const GetSubComUserEmployees = (code) => {
  return request(`/api/querySubComUserEmployee/${code}`)
}

